package com.SSH_Test.action;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.SSH_Test.dao.TestDao;
import com.SSH_Test.pojo.TestUser;
import com.opensymphony.xwork2.ActionSupport;

@Component("helloaction")
public class hello_action extends ActionSupport{
	
	private TestDao testdao;
	private List<TestUser> list;
	public TestDao getTestdao() {
		return testdao;
	}
	public List<TestUser> getList() {
		return list;
	}
	public void setList(List<TestUser> list) {
		this.list = list;
	}
	@Resource(name="testdao")
	public void setTestdao(TestDao testdao) {
		this.testdao = testdao;
	}

	
	public String exectue(){
		list=testdao.getTestUser();
		addFieldError("msg", "answer");
		return SUCCESS;
	}

}
